package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

class zim implements zik {
   private WorksheetCollection a;
   private Worksheet b;
   private byte[] c;
   private ArrayList d;
   private String e = null;
   private int f = 0;

   private int v() {
      return this.b.m();
   }

   Worksheet s() {
      return this.b;
   }

   zim(WorksheetCollection var1, Worksheet var2, String var3) {
      this.a = var1;
      this.b = var2;
      this.d = this.d(var3);
   }

   zim(WorksheetCollection var1, Worksheet var2) {
      this.a = var1;
      this.b = var2;
   }

   public boolean a() {
      if (this.c == null) {
         return false;
      } else {
         int var1 = 4;
         zur var2 = null;
         boolean var3 = true;

         while(var1 < this.c.length - 4) {
            int var6;
            switch(this.c[var1]) {
            case 21:
               ++var1;
               break;
            case 41:
            case 73:
            case 105:
               var1 += 3;
               break;
            case 57:
            case 89:
            case 121:
               short var7 = com.aspose.cells.b.a.zc.b(this.c, var1 + 1);
               var2 = this.a.q().b(var7);
               if ((var2.a & '\uffff') != this.a.u()) {
                  return false;
               }

               Name var4 = this.a.getNames().get(com.aspose.cells.b.a.zc.b(this.c, var1 + 3) - 1);
               if (var4 != null) {
                  Range var5 = var4.s();
                  if (var5 == null) {
                     return false;
                  }
               }

               var1 += 7;
               break;
            case 58:
            case 90:
            case 122:
               var6 = com.aspose.cells.b.a.zc.e(this.c, var1 + 1) & '\uffff';
               var2 = this.a.q().b(var6);
               if ((var2.a & '\uffff') == this.a.u() && (var2.b & '\uffff') >= 0 && (var2.b & '\uffff') < this.a.getCount() && (var2.c & '\uffff') >= 0 && (var2.c & '\uffff') < this.a.getCount()) {
                  var1 += 9;
                  break;
               }

               return false;
            case 59:
            case 91:
            case 123:
               var6 = com.aspose.cells.b.a.zc.e(this.c, var1 + 1) & '\uffff';
               var2 = this.a.q().b(var6);
               if ((var2.a & '\uffff') == this.a.u() && (var2.b & '\uffff') >= 0 && (var2.b & '\uffff') < this.a.getCount() && (var2.c & '\uffff') >= 0 && (var2.c & '\uffff') < this.a.getCount()) {
                  var1 += 15;
                  break;
               }

               return false;
            case 60:
            case 61:
            case 92:
            case 93:
            case 124:
            case 125:
               return false;
            default:
               ++var1;
            }
         }

         return true;
      }
   }

   public boolean b() {
      if (this.c == null) {
         return true;
      } else if (this.d != null && this.d.size() > 0) {
         return true;
      } else {
         int var1 = 4;
         boolean var2 = true;
         int var3 = -1;
         boolean var4 = true;
         Cells var5 = null;

         while(var1 < this.c.length - 4) {
            int var11;
            int var12;
            int var16;
            int var17;
            switch(this.c[var1]) {
            case 41:
            case 73:
            case 105:
               var1 += 3;
               break;
            case 57:
            case 89:
            case 121:
               short var18 = com.aspose.cells.b.a.zc.b(this.c, var1 + 1);
               if (var3 != this.a.u()) {
                  return true;
               }

               var16 = this.a.q().d(var18);
               Name var19 = this.a.getNames().get(com.aspose.cells.b.a.zc.b(this.c, var1 + 3) - 1);
               if (var19 != null) {
                  Range var20 = var19.s();
                  if (var20 == null) {
                     return true;
                  }

                  var5 = var20.getWorksheet().getCells();
                  CellArea var21 = var20.a();
                  var11 = var21.StartRow;
                  var12 = var21.StartColumn;
                  int var13 = var21.EndRow;
                  int var14 = var21.EndColumn;
                  int var15;
                  if (var11 > var13) {
                     var15 = var11;
                     var11 = var13;
                     var13 = var15;
                  }

                  if (var12 > var14) {
                     var15 = var12;
                     var12 = var14;
                     var14 = var15;
                  }

                  if (var11 == var13) {
                     if (var5.getRowHeight(var11) != 0.0D) {
                        while(var12 <= var14) {
                           if (var5.getColumnWidth(var12) != 0.0D) {
                              return true;
                           }

                           ++var12;
                        }
                     }
                  } else if (var5.getColumnWidth(var12) != 0.0D) {
                     while(var11 <= var13) {
                        if (var5.getRowHeight(var11) != 0.0D) {
                           return true;
                        }

                        ++var11;
                     }
                  }
               }

               var1 += 7;
               break;
            case 58:
            case 90:
            case 122:
               var17 = com.aspose.cells.b.a.zc.e(this.c, var1 + 1) & '\uffff';
               var3 = this.a.q().c(var17);
               if (var3 != this.a.u()) {
                  return true;
               }

               var16 = this.a.q().d(var17);
               if (var16 >= 0 && var16 < this.a.getCount()) {
                  int var6 = com.aspose.cells.b.a.zc.a(this.c, var1 + 3);
                  int var7 = zcew.a(this.c, var1 + 7);
                  var5 = this.a.get(var16).getCells();
                  if (var5.getRowHeight(var6) != 0.0D && var5.getColumnWidth(var7) != 0.0D) {
                     return true;
                  }

                  var1 += 9;
                  break;
               }

               var1 += 9;
               break;
            case 59:
            case 91:
            case 123:
               var17 = com.aspose.cells.b.a.zc.e(this.c, var1 + 1) & '\uffff';
               var3 = this.a.q().c(var17);
               if (var3 != this.a.u()) {
                  return true;
               }

               var16 = this.a.q().d(var17);
               if (var16 >= 0 && var16 < this.a.getCount()) {
                  int var8 = com.aspose.cells.b.a.zc.a(this.c, var1 + 3);
                  int var9 = com.aspose.cells.b.a.zc.a(this.c, var1 + 7);
                  int var10 = zcew.a(this.c, var1 + 11);
                  var11 = zcew.a(this.c, var1 + 13);
                  if (var8 > var9) {
                     var12 = var8;
                     var8 = var9;
                     var9 = var12;
                  }

                  if (var10 > var11) {
                     var12 = var10;
                     var10 = var11;
                     var11 = var12;
                  }

                  var5 = this.a.get(var16).getCells();
                  if (var8 == var9) {
                     if (var5.getRowHeight(var8) != 0.0D) {
                        while(var10 <= var11) {
                           if (var5.getColumnWidth(var10) != 0.0D) {
                              return true;
                           }

                           ++var10;
                        }
                     }
                  } else if (var5.getColumnWidth(var10) != 0.0D) {
                     while(var8 <= var9) {
                        if (var5.getRowHeight(var8) != 0.0D) {
                           return true;
                        }

                        ++var8;
                     }
                  }

                  var1 += 15;
                  break;
               }

               var1 += 15;
               break;
            case 60:
            case 61:
            case 92:
            case 93:
            case 124:
            case 125:
               return this.d != null && this.d.size() > 0;
            default:
               ++var1;
            }
         }

         return false;
      }
   }

   public ArrayList d() {
      return this.d;
   }

   public void a(ArrayList var1) {
      this.d = var1;
   }

   public String e() {
      return this.e;
   }

   public void a(String var1) {
      this.e = var1;
   }

   public byte[] f() {
      return this.c;
   }

   public void a(byte[] var1) {
      this.c = var1;
   }

   public boolean g() {
      if (this.c != null) {
         byte var1 = 4;
         switch(this.c[var1]) {
         case 42:
         case 43:
         case 60:
         case 61:
         case 74:
         case 75:
         case 92:
         case 93:
         case 106:
         case 107:
         case 124:
         case 125:
            return true;
         }
      }

      return false;
   }

   public String h() {
      switch(this.f) {
      case 1:
      case 6:
         return zio.b(this.d);
      case 2:
      case 3:
      case 4:
         return this.a.b().a(-1, -1, this.c, 0, 0, false);
      case 5:
         String var1 = this.a.b().a(-1, -1, this.c, 0, 0, false);
         return var1.substring(1, 1 + (var1.length() - 1));
      default:
         return "";
      }
   }

   private int a(boolean var1) {
      int var2 = 4;
      int var3 = 1;

      while(var2 < this.c.length - 4) {
         switch(this.c[var2]) {
         case 41:
         case 73:
         case 105:
            var2 += 3;
            break;
         case 57:
         case 89:
         case 121:
            var2 += 7;
            break;
         case 58:
         case 90:
         case 122:
            var2 += 9;
            break;
         case 59:
         case 91:
         case 123:
            int var4 = com.aspose.cells.b.a.zc.a(this.c, var2 + 3);
            int var5 = com.aspose.cells.b.a.zc.a(this.c, var2 + 7);
            int var6 = zcew.a(this.c, var2 + 11);
            int var7 = zcew.a(this.c, var2 + 13);
            int var8;
            if (var4 > var5) {
               var8 = var4;
               var4 = var5;
               var5 = var8;
            }

            if (var6 > var7) {
               var8 = var6;
               var6 = var7;
               var7 = var8;
            }

            if (var4 != var5 && var6 != var7) {
               boolean var9 = false;
               if (var1) {
                  var8 = var7 - var6 + 1;
               } else {
                  var8 = var5 - var4 + 1;
               }

               if (var8 > var3) {
                  var3 = var8;
               }
            }

            var2 += 15;
            break;
         case 60:
         case 92:
         case 124:
            var2 += 9;
            break;
         case 61:
         case 93:
         case 125:
            var2 += 15;
            break;
         default:
            ++var2;
         }
      }

      return var3;
   }

   ArrayList a(boolean var1, int[] var2) {
      ArrayList var3 = new ArrayList();
      boolean var4 = false;
      boolean var5 = false;
      boolean var6 = false;
      int var7 = 4;
      boolean var8 = false;
      boolean[] var9 = new boolean[var2[0]];

      int var10;
      for(var10 = 0; var10 < var2[0]; ++var10) {
         com.aspose.cells.b.a.a.ze.a(var3, (Object)(new ArrayList()));
      }

      while(true) {
         int var11;
         while(var7 < this.c.length - 4) {
            switch(this.c[var7]) {
            case 41:
            case 73:
            case 105:
               var7 += 3;
               break;
            case 57:
            case 89:
            case 121:
               var7 += 7;
               break;
            case 58:
            case 90:
            case 122:
               var7 += 9;
               break;
            case 59:
            case 91:
            case 123:
               int var20 = com.aspose.cells.b.a.zc.e(this.c, var7 + 1) & '\uffff';
               int var19 = this.a.q().c(var20);
               int var21 = this.a.q().d(var20);
               var10 = com.aspose.cells.b.a.zc.a(this.c, var7 + 3);
               var11 = com.aspose.cells.b.a.zc.a(this.c, var7 + 7);
               int var12 = zcew.a(this.c, var7 + 11);
               int var13 = zcew.a(this.c, var7 + 13);
               int var14;
               if (var10 > var11) {
                  var14 = var10;
                  var10 = var11;
                  var11 = var14;
               }

               if (var12 > var13) {
                  var14 = var12;
                  var12 = var13;
                  var13 = var14;
               }

               ArrayList var23;
               Iterator var24;
               Object var25;
               if (var19 != this.a.u()) {
                  if (this.d != null && this.d.size() != 0) {
                     var23 = new ArrayList();
                     var24 = this.d.iterator();

                     while(true) {
                        while(var24.hasNext()) {
                           var25 = var24.next();
                           if (var2[0] == 2 && var25 != null) {
                              String var26 = com.aspose.cells.b.a.zr.a(var25);
                              if (var26.startsWith("\n")) {
                                 String var18 = var26.substring(1);
                                 com.aspose.cells.b.a.a.ze.a(var23, (Object)(new zit(var18, 0, (String)null)));
                              } else {
                                 com.aspose.cells.b.a.a.ze.a(var23, (Object)(new zit(var25, 0, (String)null)));
                              }
                           } else {
                              com.aspose.cells.b.a.a.ze.a(var23, (Object)(new zit(var25, 0, (String)null)));
                           }
                        }

                        var2[0] = 1;
                        return var23;
                     }
                  }

                  var2[0] = 1;
                  var23 = new ArrayList();
                  this.a(var23, false, var10, var12, var11, var13, var19, var21);
                  return var23;
               }

               if (var21 < 0 || var21 >= this.a.getCount()) {
                  var2[0] = 1;
                  if (this.d != null && this.d.size() != 0) {
                     var23 = new ArrayList();
                     var24 = this.d.iterator();

                     while(var24.hasNext()) {
                        var25 = var24.next();
                        com.aspose.cells.b.a.a.ze.a(var23, (Object)(new zit(var25, 0, (String)null)));
                     }

                     return var23;
                  } else {
                     return null;
                  }
               }

               if (var12 != var13 && var10 != var11) {
                  Cells var22 = this.a.get(var21).getCells();
                  if (var11 > var22.d(0)) {
                     var11 = var22.d(0);
                  }

                  zit var15 = null;
                  int var16;
                  int var17;
                  if (var1) {
                     for(var16 = var10; var16 <= var11; ++var16) {
                        for(var17 = 0; var17 < var2[0]; ++var17) {
                           var15 = this.a((ArrayList)var3.get(var17), var22, var16, var12 + var17, false);
                           if (!var15.e) {
                              var9[var17] = true;
                              var8 = true;
                           }
                        }
                     }
                  } else {
                     for(var16 = var12; var16 <= var13; ++var16) {
                        for(var17 = 0; var17 < var2[0]; ++var17) {
                           var15 = this.a((ArrayList)var3.get(var17), var22, var10 + var17, var16, false);
                           if (!var15.e) {
                              var9[var17] = true;
                              var8 = true;
                           }
                        }
                     }
                  }
               }

               var7 += 15;
               break;
            case 60:
            case 92:
            case 124:
               var7 += 9;
               break;
            case 61:
            case 93:
            case 125:
               var7 += 15;
               break;
            default:
               ++var7;
            }
         }

         if (var8) {
            var10 = 0;

            for(var11 = 0; var11 < var9.length; ++var10) {
               if (!var9[var11]) {
                  var3.remove(var10--);
                  --var2[0];
               }

               ++var11;
            }

            if (var3.size() == 1) {
               var2[0] = 1;
               return (ArrayList)var3.get(0);
            }

            return var3;
         }

         var2[0] = 1;
         return (ArrayList)var3.get(0);
      }
   }

   public ArrayList a(boolean var1, boolean var2, int[] var3) {
      if (var2 && this.d != null && this.d.size() > 0) {
         return zio.a(this.d, this.e(), var1, var2, var3);
      } else {
         boolean var4 = false;
         if (this.c != null) {
            var3[0] = this.a(var1);
            if (var3[0] > 1) {
               return this.a(var1, var3);
            }
         }

         var3[0] = 1;
         boolean[] var5 = new boolean[]{var4};
         ArrayList var6 = this.a(false, var2, var5);
         var4 = var5[0];
         return var6;
      }
   }

   private void a(ArrayList var1, boolean var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      String var9 = "General";
      if (this.e() != null && !"".equals(this.e())) {
         var9 = this.e();
      }

      zbqg var10 = this.a.v().a(var7);
      if (var8 >= 0 && var10.c() != null && var8 <= var10.c().length) {
         zut var11 = var10.c(var8);
         boolean var10000;
         if (var11 != null && var11.e()) {
            var10000 = true;
         } else {
            var10000 = false;
         }

         Object[][] var13 = zup.b(var11, var3, var4, var5, var6);

         for(int var14 = 0; var14 < var13.length; ++var14) {
            for(int var15 = 0; var15 < var13[var14].length; ++var15) {
               if (var13[var14][var15] == null) {
                  if (var2) {
                     com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit((Object)null, 0, var9)));
                  } else {
                     com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit((Object)null, 0, var9)));
                  }
               } else if (var2) {
                  if (var13[var14][var15] instanceof Double) {
                     com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit(var13[var14][var15], 0, var9)));
                  } else if (var13[var14][var15] != null && "NA".equals(com.aspose.cells.b.a.zr.a(var13[var14][var15]))) {
                     zit var16 = new zit();
                     var16.g = 2;
                     var16.a = "#N/A";
                     var16.c = var9;
                     com.aspose.cells.b.a.a.ze.a(var1, (Object)var16);
                  } else {
                     com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit(0.0D, 0, var9)));
                  }
               } else {
                  com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit(com.aspose.cells.b.a.zr.a(var13[var14][var15]), 0, var9)));
               }
            }
         }

      } else {
         if (var2) {
            com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit((Object)null, 0, var9)));
         } else {
            com.aspose.cells.b.a.a.ze.a(var1, (Object)(new zit((Object)null, 0, var9)));
         }

      }
   }

   public String i() {
      boolean var1 = false;
      boolean[] var2 = new boolean[]{var1};
      ArrayList var3 = this.a(false, false, var2);
      var1 = var2[0];
      if (!var1 && var3 != null && var3.size() != 0) {
         zit var4 = (zit)var3.get(0);
         return this.a(var4);
      } else {
         return "";
      }
   }

   private String a(zit var1) {
      switch(var1.g) {
      case 1:
         if (var1.a != null && !"".equals(var1.a())) {
            double var2 = 0.0D;

            try {
               var2 = (Double)var1.a;
            } catch (Exception var7) {
               return var1.a();
            }

            String var4 = null;
            var4 = var1.c;
            if ((var4 == null || "".equals(var4)) && var1.b != 0) {
               var4 = this.s().getWorkbook().getSettings().e().d(var1.b);
            }

            DateTime var5 = CellsHelper.getDateTimeFromDouble(var2, this.s().getWorkbook().getSettings().getDate1904());
            if (var4 != null && "".equals(var4)) {
               var4 = null;
            }

            zxz var6 = this.s().getWorkbook().getSettings().e().a(var4, var5, false);
            return var6.h();
         }

         return var1.a();
      default:
         if (var1.a != null && !"".equals(var1.a())) {
            String var8 = null;
            var8 = var1.c;
            if ((var8 == null || "".equals(var8)) && var1.b != 0) {
               var8 = this.s().getWorkbook().getSettings().e().d(var1.b);
            }

            if (var8 != null && "".equals(var8)) {
               var8 = null;
            }

            zxz var3 = this.s().getWorkbook().getSettings().e().a(var8, var1.a, false);
            return var3.h();
         } else {
            return var1.a();
         }
      }
   }

   public ArrayList a(boolean var1, boolean var2, boolean[] var3) {
      var3[0] = false;
      ArrayList var4 = new ArrayList();
      if (var2 && this.d != null && this.d.size() != 0) {
         zio.a(this.d, this.e(), var4, var1);
         return var4;
      } else if ((this.f == 1 || this.f == 6) && this.d != null) {
         zio.a(this.d, this.e(), var4, var1);
         return var4;
      } else if (this.c == null) {
         return null;
      } else {
         int var5 = 4;
         boolean var6 = false;
         boolean var7 = false;
         boolean var8 = false;
         Cells var9 = null;

         while(true) {
            while(var5 < this.c.length - 4) {
               int var16;
               int var22;
               int var24;
               int var25;
               switch(this.c[var5]) {
               case 41:
               case 73:
               case 105:
                  var5 += 3;
                  break;
               case 57:
               case 89:
               case 121:
                  short var23 = com.aspose.cells.b.a.zc.b(this.c, var5 + 1);
                  var25 = this.a.q().a(this.a, var23);
                  boolean var10000;
                  if (var25 >= 0 && var25 < this.a.getCount()) {
                     var10000 = true;
                  } else {
                     var10000 = false;
                  }

                  Name var26 = this.a.getNames().get(com.aspose.cells.b.a.zc.b(this.c, var5 + 3) - 1);
                  if (var26 != null && var26.b() != null) {
                     Range var28 = var26.s();
                     int var19;
                     if (var28 == null) {
                        zyh var27 = new zyh(this.a.n());
                        zabd var30 = this.a.x().a((Name)var26, (Cell)null);
                        Object var32 = var27.b(var30, (Cell)null);
                        if (com.aspose.cells.a.c.zc.a(var32)) {
                           Object[] var37 = (Object[])((Object[])var32);

                           for(var19 = 0; var19 < var37.length; ++var19) {
                              Object[] var38 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var37, var19));
                              if (var38 != null) {
                                 for(int var21 = 0; var21 < var38.length; ++var21) {
                                    com.aspose.cells.b.a.a.ze.a(var4, (Object)(new zit(com.aspose.cells.b.a.za.a(var38, var21), 0, (String)null)));
                                 }
                              }
                           }

                           var5 += 7;
                           break;
                        }

                        if (var32 instanceof zft) {
                           zft var34 = (zft)var32;
                           var25 = var34.b;
                           if (var25 >= 0 && var25 < this.a.getCount()) {
                              var28 = new Range(var34.d.StartRow, var34.d.StartColumn, var34.d.EndRow - var34.d.StartRow + 1, var34.d.EndColumn - var34.d.StartColumn + 1, this.a.get(var34.b).getCells());
                           }
                        }
                     }

                     if (var28 == null) {
                        if (this.d != null) {
                           Iterator var31 = this.d.iterator();

                           while(var31.hasNext()) {
                              Object var36 = var31.next();
                              com.aspose.cells.b.a.a.ze.a(var4, (Object)(new zit(var36, 0, (String)null)));
                           }

                           return var4;
                        }

                        if (var25 > this.a.getCount()) {
                           var3[0] = true;
                           com.aspose.cells.b.a.a.ze.a(var4, (Object)(new zit(0.0D, 0, (String)null)));
                        }

                        var5 += 7;
                        break;
                     }

                     var9 = var28.getWorksheet().getCells();
                     CellArea var29 = var28.a();
                     var16 = var29.StartRow;
                     int var33 = var29.StartColumn;
                     int var35 = var29.EndRow;
                     var19 = var29.EndColumn;
                     int var20;
                     if (var16 > var35) {
                        var20 = var16;
                        var16 = var35;
                        var35 = var20;
                     }

                     if (var33 > var19) {
                        var20 = var33;
                        var33 = var19;
                        var19 = var20;
                     }

                     if (var16 == var35) {
                        while(var33 <= var19) {
                           this.a(var4, var9, var16, var33, var1);
                           ++var33;
                        }
                     } else {
                        while(var16 <= var35) {
                           this.a(var4, var9, var16, var33, var1);
                           ++var16;
                        }
                     }
                  }

                  var5 += 7;
                  break;
               case 58:
               case 90:
               case 122:
                  var22 = com.aspose.cells.b.a.zc.e(this.c, var5 + 1) & '\uffff';
                  var24 = this.a.q().c(var22);
                  var25 = this.a.q().d(var22);
                  int var10 = com.aspose.cells.b.a.zc.a(this.c, var5 + 3);
                  int var11 = zcew.a(this.c, var5 + 7);
                  if (var24 != this.a.u()) {
                     this.a(var4, var1, var10, var11, var10, var11, var24, var25);
                     var5 += 9;
                  } else {
                     if (var25 >= 0 && var25 < this.a.getCount()) {
                        var9 = this.a.get(var25).getCells();
                        this.a(var4, var9, var10, var11, var1);
                        var5 += 9;
                        continue;
                     }

                     var3[0] = true;
                     com.aspose.cells.b.a.a.ze.a(var4, (Object)(new zit(0.0D, 0, (String)null)));
                     var5 += 9;
                  }
                  break;
               case 59:
               case 91:
               case 123:
                  var22 = com.aspose.cells.b.a.zc.e(this.c, var5 + 1) & '\uffff';
                  var24 = this.a.q().c(var22);
                  var25 = this.a.q().d(var22);
                  int var12 = com.aspose.cells.b.a.zc.a(this.c, var5 + 3);
                  int var13 = com.aspose.cells.b.a.zc.a(this.c, var5 + 7);
                  int var14 = zcew.a(this.c, var5 + 11);
                  int var15 = zcew.a(this.c, var5 + 13);
                  if (var12 > var13) {
                     var16 = var12;
                     var12 = var13;
                     var13 = var16;
                  }

                  if (var14 > var15) {
                     var16 = var14;
                     var14 = var15;
                     var15 = var16;
                  }

                  if (var24 != this.a.u()) {
                     this.a(var4, var1, var12, var14, var13, var15, var24, var25);
                     var5 += 15;
                  } else {
                     if (var25 >= 0 && var25 < this.a.getCount()) {
                        var9 = this.a.get(var25).getCells();
                        if (var12 == var13) {
                           while(var14 <= var15) {
                              this.a(var4, var9, var12, var14, var1);
                              ++var14;
                           }
                        } else {
                           for(var16 = var9.d(0); var12 <= var13; ++var12) {
                              if (var12 <= var16) {
                                 this.a(var4, var9, var12, var14, var1);
                              } else {
                                 Style var17 = null;
                                 zit var18 = new zit();
                                 com.aspose.cells.b.a.a.ze.a(var4, (Object)var18);
                                 if (var9.getRowHeight(var12) == 0.0D || var9.getColumnWidth(var14) == 0.0D) {
                                    var18.d = false;
                                 }

                                 var18.e = true;
                                 var18.g = 3;
                                 var17 = zio.a(var9, var12, var14);
                                 if (var1) {
                                    var18.a = 0.0D;
                                 } else {
                                    var18.a = "";
                                 }

                                 if (var17 != null) {
                                    var18.b = var17.getNumber();
                                    var18.c = var17.getCustom();
                                    var18.f = var17.isDateTime();
                                 }
                              }
                           }
                        }

                        var5 += 15;
                        break;
                     }

                     var3[0] = true;
                     com.aspose.cells.b.a.a.ze.a(var4, (Object)(new zit(0.0D, 0, (String)null)));
                     var5 += 15;
                  }
                  break;
               case 60:
               case 92:
               case 124:
                  var3[0] = true;
                  var5 += 9;
                  break;
               case 61:
               case 93:
               case 125:
                  var3[0] = true;
                  var5 += 15;
                  break;
               default:
                  ++var5;
               }
            }

            if (var3[0]) {
               var4 = new ArrayList();
               if (this.d != null) {
                  zio.a(this.d, this.e(), var4, var1);
                  return var4;
               }
            }

            return var4;
         }
      }
   }

   public zit a(ArrayList var1, Cells var2, int var3, int var4, boolean var5) {
      Style var6 = null;
      Cell var7 = null;
      zit var8 = new zit();
      if (var2.getRowHeight(var3) == 0.0D || var2.getColumnWidth(var4) == 0.0D) {
         var8.d = false;
      }

      var7 = var2.checkCell(var3, var4);
      if (var7 == null) {
         var8.e = true;
         var8.g = 3;
         var6 = zio.a(var2, var3, var4);
         if (var5) {
            var8.a = 0.0D;
         } else {
            var8.a = "";
         }

         if (var6 != null) {
            var8.b = var6.getNumber();
            var8.c = var6.getCustom();
            var8.f = var6.isDateTime();
         }
      } else {
         var8.e = false;
         var8.g = var7.getType();
         switch(var7.getType()) {
         case 3:
            var8.e = true;
            if (var5) {
               var8.a = 0.0D;
            } else {
               var8.a = "";
            }
            break;
         default:
            if (var5) {
               var8.a = this.a(var7);
            } else {
               var8.a = this.a(var7);
            }
         }

         if (var7.q()) {
            var6 = var7.p();
         }

         if (var6 != null) {
            if (var6.getCustom() != null && !"".equals(var6.getCustom())) {
               var8.c = var6.getCustom();
            } else {
               var8.c = this.a.n().getSettings().e().d(var6.getNumber());
            }

            var8.b = var6.getNumber();
            var8.f = var6.isDateTime();
         } else {
            var8.c = "";
            var8.b = 0;
         }
      }

      com.aspose.cells.b.a.a.ze.a(var1, (Object)var8);
      return var8;
   }

   private Object a(Cell var1) {
      try {
         switch(var1.getType()) {
         case 0:
            return var1.getValue();
         case 1:
         case 4:
            return var1.getDoubleValue();
         case 2:
         case 3:
         case 5:
         case 6:
            return var1.j();
         default:
            return 0;
         }
      } catch (Exception var3) {
         return 0;
      }
   }

   public int j() {
      if (this.c == null) {
         return this.a.q().b(this.a.u(), this.v());
      } else {
         byte var1 = 4;
         return com.aspose.cells.b.a.zc.e(this.c, var1 + 1);
      }
   }

   private void a(String[] var1) {
      if (var1[0].charAt(0) == '(') {
         var1[0] = var1[0].substring(1);
         String var2 = var1[var1.length - 1];
         var1[var1.length - 1] = var2.substring(0, 0 + (var2.length() - 1));
      }

      int var9 = this.a.u();

      for(int var3 = 0; var3 < var1.length; ++var3) {
         var1[var3] = var1[var3].trim();
      }

      if (var1.length > 0 && var1[0].charAt(0) == '=') {
         var1[0] = var1[0].substring(1);
      }

      ArrayList var10 = new ArrayList(var1.length);
      int var4 = 3 + var1.length - 1 + 1;

      byte[] var8;
      for(int var5 = 0; var5 < var1.length; ++var5) {
         String var6 = var1[var5];
         byte[] var7 = this.e(var6);
         var8 = new byte[var7.length - 8];
         System.arraycopy(var7, 4, var8, 0, var8.length);
         com.aspose.cells.b.a.a.ze.a(var10, (Object)var8);
         var4 += var8.length;
      }

      byte[] var11 = new byte[var4 + 8];
      System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, var11, 0, 4);
      byte var12 = 4;
      var11[var12] = 41;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - 4), 0, var11, var12 + 1, 2);
      int var13 = var12 + 3;

      for(int var14 = 0; var14 < var10.size(); ++var14) {
         var8 = (byte[])((byte[])var10.get(var14));
         System.arraycopy(var8, 0, var11, var13, var8.length);
         var13 += var8.length;
         if (var14 > 0) {
            var11[var13] = 16;
            ++var13;
         }
      }

      var11[var13++] = 21;
      this.c = var11;
      this.f = 5;
   }

   int b(int var1) {
      return this.a.q().b(this.a.u(), var1);
   }

   int b(String var1) {
      int var2 = -1;

      for(int var3 = 0; var3 < this.a.getCount(); ++var3) {
         if (com.aspose.cells.b.a.zv.b(var1.toUpperCase(), this.a.get(var3).getName().toUpperCase())) {
            var2 = var3;
            break;
         }
      }

      return var2;
   }

   private ArrayList d(String var1) {
      if (var1 != null && !"".equals(var1)) {
         this.d = this.c(var1);
         return this.d;
      } else {
         return null;
      }
   }

   public int k() {
      if (this.d != null && !this.a()) {
         return this.d.size();
      } else {
         switch(this.f) {
         case 0:
            return 0;
         case 1:
         case 6:
            if (this.d != null) {
               return this.d.size();
            }

            return 0;
         case 2:
            return 1;
         case 3:
            int var1 = this.o() - this.m() + 1;
            if (var1 == 1) {
               return this.p() - this.n() + 1;
            }

            return var1;
         case 4:
            Range var2 = this.l();
            if (var2 == null) {
               return 0;
            }

            return var2.getRowCount() == 1 ? var2.getColumnCount() : var2.getRowCount();
         case 5:
            if (this.c == null) {
               return 0;
            } else {
               int var3 = 0;
               int var4 = 4;

               while(var4 < this.c.length - 4) {
                  switch(this.c[var4]) {
                  case 41:
                  case 73:
                  case 105:
                     var4 += 3;
                     break;
                  case 58:
                  case 90:
                  case 122:
                     ++var3;
                     var4 += 9;
                     break;
                  case 59:
                  case 91:
                  case 123:
                     int var5 = com.aspose.cells.b.a.zc.a(this.c, var4 + 3);
                     int var6 = com.aspose.cells.b.a.zc.a(this.c, var4 + 7);
                     int var7 = zcew.a(this.c, var4 + 11);
                     int var8 = zcew.a(this.c, var4 + 13);
                     int var9;
                     if (var5 > var6) {
                        var9 = var5;
                        var5 = var6;
                        var6 = var9;
                     }

                     if (var7 > var8) {
                        var9 = var7;
                        var7 = var8;
                        var8 = var9;
                     }

                     if (var5 == var6) {
                        var3 += var8 - var7 + 1;
                     } else {
                        var3 += var6 - var5 + 1;
                     }

                     var4 += 15;
                     break;
                  case 60:
                  case 92:
                  case 124:
                     var4 += 9;
                     break;
                  case 61:
                  case 93:
                  case 125:
                     var4 += 15;
                     break;
                  default:
                     ++var4;
                  }
               }

               return var3;
            }
         default:
            throw new CellsException(6, "Invalid series values.");
         }
      }
   }

   ArrayList c(String var1) {
      if (var1.charAt(0) != '{') {
         if (var1.indexOf(44) != -1) {
            String[] var11 = zio.a(var1);
            if (var11.length > 1) {
               this.a(var11);
               return null;
            }
         }

         if (var1.charAt(0) == '(' && var1.charAt(var1.length() - 1) == ')') {
            var1 = var1.substring(1, 1 + (var1.length() - 2));
         }

         this.c = this.e(var1);
         if (this.f != 4 && this.c != null) {
            this.f = this.c.length == 17 ? 2 : 3;
         }

         return null;
      } else if (var1.charAt(var1.length() - 1) != '}') {
         throw new CellsException(6, "Invalide Chart data format.");
      } else {
         String var4 = var1.substring(1, 1 + (var1.length() - 2)).trim();
         if ("".equals(var4)) {
            throw new CellsException(6, "Invalid Chart data.");
         } else {
            ArrayList var5 = zio.b(var4);
            ArrayList var6 = new ArrayList();
            this.f = 1;

            for(int var7 = 0; var7 < var5.size(); ++var7) {
               String var8 = (String)var5.get(var7);

               try {
                  if (zapb.b(var8)) {
                     double var2 = zase.B(var8);
                     com.aspose.cells.b.a.a.ze.a(var6, (Object)var2);
                  } else if (zsk.c(var8)) {
                     com.aspose.cells.b.a.a.ze.a(var6, (Object)var8);
                  } else if (var8 != null && "TRUE".equals(var8.toUpperCase())) {
                     com.aspose.cells.b.a.a.ze.a(var6, (Object)1.0D);
                  } else {
                     if (var8 == null || !"FALSE".equals(var8.toUpperCase())) {
                        this.f = 6;
                        break;
                     }

                     com.aspose.cells.b.a.a.ze.a(var6, (Object)0.0D);
                  }
               } catch (Exception var10) {
                  throw new CellsException(6, "Invalid Chart data.");
               }
            }

            if (this.f == 6) {
               var6.clear();

               for(int var13 = 0; var13 < var5.size(); ++var13) {
                  String var12 = (String)var5.get(var13);
                  if (var12 != null && !"".equals(var12) && var12.charAt(0) == '"') {
                     var12 = var12.substring(1, 1 + (var12.length() - 2)).trim();
                  }

                  com.aspose.cells.b.a.a.ze.a(var6, (Object)var12);
               }
            }

            return var6;
         }
      }
   }

   private byte[] a(String var1, String var2) {
      Object var3 = null;
      byte[] var20;
      if ("#REF!".equals(var2)) {
         var20 = new byte[17];
         var20[0] = 9;
         var20[4] = 60;
         return var20;
      } else {
         boolean var4 = false;
         boolean var5 = false;
         boolean var6 = false;
         boolean var7 = false;
         int[] var8 = zyn.a(this.a, var1);
         int var24 = var8[0];
         int var21 = var8[1];
         int var22 = var8[2];
         int var23 = var8[3];
         int var9 = var2.indexOf(58);
         byte var10 = 0;
         byte var11 = 0;
         byte var12 = 0;
         int[] var14;
         int[] var15;
         int var25;
         int var26;
         if (var9 != -1) {
            this.f = 3;
            var20 = new byte[23];
            var20[var12] = 15;
            var12 = 4;
            var20[var12] = 59;
            String var13 = var2.substring(0, 0 + var9).trim();
            var14 = new int[]{var10};
            var15 = new int[]{var11};
            this.a(var13, true, var14, var15);
            var25 = var14[0];
            var26 = var15[0];
            zcew.a(var20, var12 + 3, var25, 0, true, false);
            zcew.c(var20, var12 + 11, var26, 0, true, false);
            String var28 = var2.substring(var9 + 1).trim();
            var15 = new int[]{var25};
            int[] var16 = new int[]{var26};
            this.a(var28, true, var15, var16);
            var25 = var15[0];
            var26 = var16[0];
            zcew.a(var20, var12 + 7, var25, 0, true, false);
            zcew.c(var20, var12 + 13, var26, 0, true, false);
         } else {
            boolean var27 = false;
            var14 = new int[]{var10};
            var15 = new int[]{var11};
            var27 = this.a(var2, false, var14, var15);
            var25 = var14[0];
            var26 = var15[0];
            if (var27) {
               var20 = new byte[17];
               var20[var12] = 9;
               var12 = 4;
               var20[var12 + 0] = 58;
               this.f = 2;
               zcew.a(var20, var12 + 3, var25, 0, true, false);
               zcew.c(var20, var12 + 7, var26, 0, true, false);
            } else {
               zbqg var29 = this.a.v().a(var21);
               int var17 = -1;

               for(int var18 = 0; var18 < var29.b().size(); ++var18) {
                  zuk var19 = (zuk)var29.b().get(var18);
                  if (com.aspose.cells.b.a.zv.b(var19.e().toUpperCase(), var2.toUpperCase())) {
                     var17 = var18;
                     break;
                  }
               }

               if (var17 == -1) {
                  throw new CellsException(5, "Invalid formula:");
               }

               var20 = new byte[15];
               var20[0] = 7;
               var12 = 4;
               var20[var12 + 0] = 57;
               System.arraycopy(com.aspose.cells.b.a.zc.a((var17 & '\uffff') + 1), 0, var20, var12 + 3, 2);
               this.f = 4;
            }
         }

         System.arraycopy(com.aspose.cells.b.a.zc.a(var24), 0, var20, 5, 2);
         return var20;
      }
   }

   private byte[] e(String var1) {
      if (var1.charAt(0) == '=') {
         var1 = var1.substring(1).toUpperCase();
      } else {
         var1 = var1.toUpperCase();
      }

      byte[] var19;
      if (var1.endsWith("#REF!")) {
         var19 = new byte[17];
         var19[0] = 9;
         var19[4] = 60;
         return var19;
      } else {
         Object var2 = null;
         int var3 = zyn.a(var1, '!');
         int var4 = this.v();
         boolean var5 = false;
         if (var3 != -1) {
            if (var3 == var1.length() - 1) {
               var19 = new byte[17];
               var19[0] = 9;
               var19[4] = 60;
               return var19;
            }

            var5 = true;
            this.f = 2;
            String var6 = var1.substring(0, 0 + var3).trim();
            if (var6.charAt(0) == '\'' && var6.charAt(var6.length() - 1) == '\'') {
               var6 = var6.substring(1, 1 + (var6.length() - 2));
               var6 = com.aspose.cells.b.a.zv.a(var6, "''", "'");
               if (var6 == null || "".equals(var6)) {
                  throw new CellsException(15, "Invalid worksheet name. refString = \"" + var1 + "\"");
               }
            }

            var4 = this.b(var6);
            var1 = var1.substring(var3 + 1).trim();
            if (var4 == -1) {
               return this.a(var6, var1);
            }
         }

         com.aspose.cells.b.a.g.a.ze var20 = new com.aspose.cells.b.a.g.a.ze(":");
         int var7 = this.b(var4);
         com.aspose.cells.b.a.g.a.zc var8 = var20.a(var1);
         byte var9 = 0;
         byte var10 = 0;
         byte var11 = 0;
         int[] var13;
         int[] var14;
         int var21;
         int var22;
         if (var8.c()) {
            this.f = 3;
            var19 = new byte[23];
            var19[0] = 15;
            var11 = 4;
            var19[var11 + 0] = 59;
            String var12 = var1.substring(0, 0 + var8.d()).trim();
            var13 = new int[]{var9};
            var14 = new int[]{var10};
            this.a(var12, true, var13, var14);
            var21 = var13[0];
            var22 = var14[0];
            zcew.a(var19, var11 + 3, var21, 0, true, false);
            zcew.c(var19, var11 + 11, var22, 0, true, false);
            String var24 = var1.substring(var8.d() + 1).trim();
            var14 = new int[]{var21};
            int[] var15 = new int[]{var22};
            this.a(var24, true, var14, var15);
            var21 = var14[0];
            var22 = var15[0];
            zcew.a(var19, var11 + 7, var21, 0, true, false);
            zcew.c(var19, var11 + 13, var22, 0, true, false);
         } else if ("#REF!".equals(var1.toUpperCase())) {
            var19 = new byte[17];
            var19[var11] = 9;
            var11 = 4;
            var19[var11 + 0] = 60;
         } else {
            boolean var23 = false;
            var13 = new int[]{var9};
            var14 = new int[]{var10};
            var23 = this.a(var1, false, var13, var14);
            var21 = var13[0];
            var22 = var14[0];
            if (var23) {
               var19 = new byte[17];
               var19[var11] = 9;
               var11 = 4;
               var19[var11 + 0] = 58;
               this.f = 2;
               zcew.a(var19, var11 + 3, var21, 0, true, false);
               zcew.c(var19, var11 + 7, var22, 0, true, false);
            } else {
               var4 = var5 ? var4 : -1;
               boolean var25 = false;
               boolean var16 = true;
               int var26;
               if (var5) {
                  var26 = this.a.getNames().b(var1, var4);
               } else {
                  var26 = this.a.getNames().b(var1, this.b.getIndex());
                  if (var26 == -1) {
                     var26 = this.a.getNames().b(var1, -1);
                     var25 = true;
                     var7 = this.a.q().b(this.a.u(), 65535);
                  }
               }

               if (var26 == -1) {
                  throw new CellsException(0, "Invalid data source. refString = \"" + var1 + "\"");
               }

               Name var17 = this.a.getNames().get(var26);
               if (!var5 && !var25) {
                  byte[] var18 = var17.b();
                  var19 = var18;
                  if (var18 != null) {
                     var19 = new byte[var18.length];
                     System.arraycopy(var18, 0, var19, 0, var18.length);
                  }

                  return var19;
               }

               var19 = new byte[15];
               var19[var11] = 7;
               var11 = 4;
               var19[var11 + 0] = 57;
               System.arraycopy(com.aspose.cells.b.a.zc.a((var26 & '\uffff') + 1), 0, var19, var11 + 3, 2);
               this.f = 4;
            }
         }

         System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var19, 5, 2);
         return var19;
      }
   }

   private boolean a(String var1, boolean var2, int[] var3, int[] var4) {
      boolean var5 = false;
      boolean var6 = false;
      boolean var7 = false;
      boolean var8 = false;
      boolean[] var9 = new boolean[]{var5};
      boolean[] var10 = new boolean[]{var6};
      boolean[] var11 = new boolean[]{var7};
      boolean[] var12 = new boolean[]{var8};
      boolean var13 = zcfd.a(var1, var3, var4, var2, var9, var10, var11, var12);
      var5 = var9[0];
      var6 = var10[0];
      var7 = var11[0];
      var8 = var12[0];
      return var13;
   }

   public boolean c() {
      if (this.c != null) {
         if (this.c.length == 23) {
            byte var1 = 4;
            return com.aspose.cells.b.a.zc.a(this.c, var1 + 3) != com.aspose.cells.b.a.zc.a(this.c, var1 + 7);
         }

         if (this.q() == 5) {
            return this.t();
         }
      }

      return false;
   }

   public boolean t() {
      int var1 = 4;
      CellArea var2 = new CellArea();
      boolean var3 = false;

      while(var1 < this.c.length - 4) {
         switch(this.c[var1]) {
         case 41:
         case 73:
         case 105:
            var1 += 3;
            break;
         case 57:
         case 89:
         case 121:
            var1 += 7;
            break;
         case 58:
         case 90:
         case 122:
            int var4 = com.aspose.cells.b.a.zc.a(this.c, var1 + 3);
            int var5 = zcew.a(this.c, var1 + 7);
            if (!var3) {
               var2.StartRow = var4;
               var2.EndRow = var4;
               var2.StartColumn = var5;
               var2.EndColumn = var5;
               var3 = true;
            } else {
               if (var4 < var2.StartRow) {
                  var2.StartRow = var4;
               }

               if (var4 > var2.EndRow) {
                  var2.EndRow = var4;
               }

               if (var5 < var2.StartColumn) {
                  var2.StartColumn = var5;
               }

               if (var5 > var2.EndColumn) {
                  var2.EndColumn = var5;
               }
            }

            var1 += 9;
            break;
         case 59:
         case 91:
         case 123:
            int var6 = com.aspose.cells.b.a.zc.a(this.c, var1 + 3);
            int var7 = com.aspose.cells.b.a.zc.a(this.c, var1 + 7);
            int var8 = zcew.a(this.c, var1 + 11);
            int var9 = zcew.a(this.c, var1 + 13);
            int var10;
            if (var6 > var7) {
               var10 = var6;
               var6 = var7;
               var7 = var10;
            }

            if (var8 > var9) {
               var10 = var8;
               var8 = var9;
               var9 = var10;
            }

            if (!var3) {
               var2.StartRow = var6;
               var2.EndRow = var7;
               var2.StartColumn = var8;
               var2.EndColumn = var9;
               var3 = true;
            } else {
               if (var6 < var2.StartRow) {
                  var2.StartRow = var6;
               }

               if (var7 > var2.EndRow) {
                  var2.EndRow = var7;
               }

               if (var8 < var2.StartColumn) {
                  var2.StartColumn = var8;
               }

               if (var9 > var2.EndColumn) {
                  var2.EndColumn = var9;
               }
            }

            var1 += 15;
            break;
         case 60:
         case 92:
         case 124:
            var1 += 9;
            break;
         case 61:
         case 93:
         case 125:
            var1 += 15;
            break;
         default:
            ++var1;
         }
      }

      if (var3) {
         return var2.StartRow != var2.EndRow;
      } else {
         return false;
      }
   }

   public Range l() {
      if (this.f != 4) {
         return null;
      } else {
         Name var1 = null;
         byte var2 = 4;
         switch(this.c[var2]) {
         case 35:
         case 67:
         case 99:
            var1 = this.a.getNames().get(com.aspose.cells.b.a.zc.b(this.c, var2 + 1) - 1);
            break;
         case 57:
         case 89:
         case 105:
            short var3 = com.aspose.cells.b.a.zc.b(this.c, var2 + 1);
            int var4 = this.a.q().a(this.a, var3);
            if (var4 != -1) {
               var1 = this.a.getNames().get(com.aspose.cells.b.a.zc.b(this.c, var2 + 3) - 1);
            }
         }

         return var1 == null ? null : var1.s();
      }
   }

   public int m() {
      if (this.c != null) {
         byte var1 = 4;
         return com.aspose.cells.b.a.zc.a(this.c, var1 + 3);
      } else {
         return 0;
      }
   }

   public int n() {
      if (this.c != null) {
         byte var1 = 4;
         switch(this.f) {
         case 2:
            return zcew.a(this.c, var1 + 7);
         case 3:
            return zcew.a(this.c, var1 + 11);
         }
      }

      return 0;
   }

   public int o() {
      if (this.c != null) {
         byte var1 = 4;
         switch(this.f) {
         case 2:
            return com.aspose.cells.b.a.zc.a(this.c, var1 + 3);
         case 3:
            return com.aspose.cells.b.a.zc.a(this.c, var1 + 7);
         }
      }

      return 0;
   }

   public int p() {
      if (this.c != null) {
         byte var1 = 4;
         switch(this.f) {
         case 2:
            return zcew.a(this.c, var1 + 7);
         case 3:
            return zcew.a(this.c, var1 + 13);
         }
      }

      return 0;
   }

   public int q() {
      return this.f;
   }

   public void a(int var1) {
      this.f = var1;
   }

   public void a(zik var1, int var2, CopyOptions var3) {
      zim var4 = null;
      if (var1 instanceof zim) {
         var4 = (zim)var1;
      } else {
         var4 = ((zil)var1).t();
      }

      this.f = var4.f;
      if (var4.d != null) {
         this.d = new ArrayList(var4.d.size());
         com.aspose.cells.b.a.a.ze.a(this.d, (Collection)var4.d);
      }

      if (var4.c != null) {
         this.c = new byte[var4.c.length];
         System.arraycopy(var4.c, 0, this.c, 0, this.c.length);
         if (!var3.a) {
            boolean var5 = var4.a == this.a;
            if (var3.c == 5 && var5) {
               return;
            }

            int var6 = this.a.q().f(this.a.u(), 65535, 65535);
            if (var6 == -1) {
               var6 = this.a.q().b(this.a.u(), 65535, 65535);
            }

            byte[] var7 = this.c;
            int var8 = 4;

            while(var8 < var7.length - 4) {
               int var9;
               switch(var7[var8]) {
               case 35:
               case 67:
               case 99:
                  int var12 = (com.aspose.cells.b.a.zc.e(this.c, var8 + 1) & '\uffff') - 1;
                  if (var3.d.get(var12) != null) {
                     var12 = (Integer)var3.d.get(var12);
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var12 + 1), 0, var7, var8 + 1, 2);
                  }

                  var8 += 5;
                  break;
               case 36:
               case 37:
               case 38:
               case 39:
               case 40:
               case 42:
               case 43:
               case 44:
               case 45:
               case 46:
               case 47:
               case 48:
               case 49:
               case 50:
               case 51:
               case 52:
               case 53:
               case 54:
               case 55:
               case 56:
               case 62:
               case 63:
               case 64:
               case 65:
               case 66:
               case 68:
               case 69:
               case 70:
               case 71:
               case 72:
               case 74:
               case 75:
               case 76:
               case 77:
               case 78:
               case 79:
               case 80:
               case 81:
               case 82:
               case 83:
               case 84:
               case 85:
               case 86:
               case 87:
               case 88:
               case 94:
               case 95:
               case 96:
               case 97:
               case 98:
               case 100:
               case 101:
               case 102:
               case 103:
               case 104:
               case 106:
               case 107:
               case 108:
               case 109:
               case 110:
               case 111:
               case 112:
               case 113:
               case 114:
               case 115:
               case 116:
               case 117:
               case 118:
               case 119:
               case 120:
               default:
                  ++var8;
                  break;
               case 41:
               case 73:
               case 105:
                  var8 += 3;
                  break;
               case 57:
               case 89:
               case 121:
                  var9 = com.aspose.cells.b.a.zc.e(this.c, var8 + 1) & '\uffff';
                  zur var10 = var4.a.q().b(var9);
                  if (var3.i.get(var9) != null) {
                     var9 = (Integer)var3.i.get(var9);
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var9), 0, var7, var8 + 1, 2);
                  }

                  if ((var10.a & '\uffff') == var4.a.u()) {
                     int var11 = (com.aspose.cells.b.a.zc.e(this.c, var8 + 3) & '\uffff') - 1;
                     if (var3.d.get(var11) != null) {
                        var11 = (Integer)var3.d.get(var11);
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var11 + 1), 0, var7, var8 + 3, 2);
                     }
                  }

                  var8 += 7;
                  break;
               case 58:
               case 59:
               case 90:
               case 91:
               case 122:
               case 123:
                  var9 = com.aspose.cells.b.a.zc.e(this.c, var8 + 1) & '\uffff';
                  if (var3.i.get(var9) == null) {
                     if (!var5) {
                        var9 = zup.a(var9, var4.a, this.a, var3.i, var3.k);
                        if (var9 == -1) {
                           var9 = var6;
                        }

                        System.arraycopy(com.aspose.cells.b.a.zc.a(var9), 0, var7, var8 + 1, 2);
                     }
                  } else {
                     var9 = (Integer)var3.i.get(var9);
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var9), 0, var7, var8 + 1, 2);
                  }

                  switch(var7[var8]) {
                  case 58:
                  case 90:
                  case 122:
                     var8 += 9;
                     continue;
                  default:
                     var8 += 15;
                     continue;
                  }
               case 60:
               case 92:
               case 124:
                  var8 += 9;
                  break;
               case 61:
               case 93:
               case 125:
                  var8 += 15;
               }
            }
         }
      } else {
         this.c = null;
      }

   }

   public void r() {
      if (this.c != null) {
         if (zyo.a(this.c, -1, -1, (WorksheetCollection)this.a)) {
            this.c = null;
            if (this.d == null) {
               this.d = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(this.d, (Object)0.0D);
               this.f = 1;
            } else {
               switch(this.f) {
               case 0:
               case 2:
               case 3:
               case 4:
               case 5:
                  Iterator var1 = this.d.iterator();

                  Object var2;
                  do {
                     do {
                        if (!var1.hasNext()) {
                           this.f = 1;
                           return;
                        }

                        var2 = var1.next();
                     } while(var2 == null);
                  } while(!(var2 instanceof String) && !(var2 instanceof Boolean));

                  this.f = 6;
                  return;
               case 1:
               }
            }

         }
      }
   }

   zil u() {
      zil var1 = new zil(this.a, this.b);
      if (this.d != null) {
         var1.a(new ArrayList());
         com.aspose.cells.b.a.a.ze.a(var1.d(), (Collection)this.d);
      }

      if (this.c != null) {
         var1.a(zcr.a(this.c, -1));
      }

      var1.a(this.f);
      return var1;
   }
}
